package com.sinoglobal.dumping.dumplingtype;

import android.content.Context;

import com.sinoglobal.dumping.bean.Dumpling_LogOutAcquireDumpling;
import com.sinoglobal.dumping.bean.Dumpling_LogOutAcquireDumplingBean;
import com.sinoglobal.dumping.fragment.Dumpling_HomeFragment;
import com.sinoglobal.dumping.util.DumplingCache;

/**
 * Created by KeZhuang on 2016/1/26.
 */
public abstract class AbsDumplingType {
    Context mContext;
    Dumpling_HomeFragment mFragment;
    Dumpling_LogOutAcquireDumplingBean mBean;
    Dumpling_LogOutAcquireDumpling mDumpling;
    private DumplingCache mCache;
    public abstract void operation();
    public AbsDumplingType(Dumpling_HomeFragment fragment){
        mFragment = fragment;
        mContext = mFragment.getContext();
        mBean = mFragment.getAcquireDumplingBean();
        mDumpling = mBean.getResultList().getDumpling();
        mCache = new DumplingCache(mContext);
    }
    void putCache(String key,Object value){
        mCache.put(key,value);
    }
    Object getCache(String key,Object defaultValue){return mCache.get(key,defaultValue);}
}
